fix: resolve type errors and Pydantic failures from codegen overwrites#2703
Open
fix: resolve type errors and Pydantic failures from codegen overwrites#2703
Conversation
- asset_create_params: restore missing Required import - organization_profile: inline Result type alias from deleted module - ai/to_markdown: add type-checker suppression for files kwarg in _get_api_list; fix mypy comment placement on call site - radar/ai/to_markdown: fix mypy comment placement on call site - pipelines params (sink_create_params, stream_create_params): restore TypedDict base class on SchemaFieldStruct/SchemaFieldList with object for recursive field refs to avoid Pydantic schema generation errors - pipelines responses (6 files): add BaseModel base class, type discriminator, and standard fields to SchemaFieldStruct/SchemaFieldList stubs with object for recursive refs All fixes address codegen overwrites of manual patches from earlier commits (1c415a2, f280942).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Requiredimport dropped by codegenResulttype alias after codegen deletedorganization_profile_get_params.py# type: ignore[call-arg]on_get_api_list()call site for mypy; keep# pyright: ignoreonfiles=kwargTypedDictbase class onSchemaFieldStruct/SchemaFieldListwithobjectfor recursive field refsBaseModelbase class,typediscriminator field, and standard fields toSchemaFieldStruct/SchemaFieldListstubs withobjectfor recursive refsContext
All issues stem from the April 19-23 codegen runs (
3b83baa3b,0d6464258,988df8632) overwriting earlier manual fixes (1c415a2dd,f280942f4). The pipelines recursive types useobjectinstead of forward-referencing"SchemaField"to avoid Pydantic v2PydanticSchemaGenerationErrorat module import time.Validation
Remaining test failures (dns.records scan_list/scan_review, workers.beta.workers create/update) are mock server issues addressed in a separate cloudflare-config skip PR: https://gitlab.cfdata.org/cloudflare/sdks/cloudflare-config/-/merge_requests/730